<?php /* @var $this->menu My_Html_Menu */ ?>
<?php if (is_array($this->menu->getItems()) && count($this->menu->getItems()) > 0): ?>
    <div class="my-menu" id ="<?php echo $this->menu->getId(); ?>">

        <div class="main-menu">
            <ul>
                <?php foreach ($this->menu->getItems() as $firsLevelItemKey => $data): ?>
                    <li>
                        <a id="<?php echo uniqid(); ?>" data-level="<?php echo $firsLevelItemKey; ?>" href="<?php echo $data['url']; ?>" alt="<?php echo $data['label']; ?>">
                            <img src="<?php echo $data['icon']; ?>" alt="<?php echo $data['label']; ?>">
                            <span><?php echo $data['label']; ?></span>
                        </a>
                    </li>

                <?php endforeach; ?>
            </ul>
        </div>

        <div class="sub-menu">
            <?php foreach ($this->menu->getItems() as $firsLevelItemKey => $firsLevelData): ?>
                <?php if (isset($firsLevelData['submenu']) && is_array($firsLevelData['submenu']) && count($firsLevelData['submenu']) > 0): ?>
                    <ul data-level="<?php echo $firsLevelItemKey; ?>" style="display: none;">
                        <?php foreach ($firsLevelData['submenu'] as $submenuKey => $data): ?>
                            <li data-item-key="<?php echo $submenuKey; ?>">
                                <a id="<?php echo uniqid(); ?>" href="<?php echo $data['url']; ?>" alt="<?php echo $data['label']; ?>"><?php echo $data['label']; ?></a>
                            </li>
                        <?php endforeach; ?>
                    </ul>
                <?php endif; ?>
            <?php endforeach; ?>
        </div>
    </div>
<?php endif; ?>